home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
biz
/
dopus
/
VisageShow.lha
/
VisageShow.dopus5
next >
Wrap
Text File
|
1997-09-05
|
2KB
|
83 lines
/*
$VER: VisageShow.dopus5 1.0 (01.9.97)
Written by Tommy Jensen
Nicer way to view pictures with Visage from Opus5
Call as:
<AREXX>DOpus5:ARexx/VisageShow.dopus5
*/
/* Change this to the path where Visage is located */
Visage = Visage
/* Change these options to suit ypur needs */
visopts = NOBUSY CENTRE WBMONITOR BUFSIZE 256 NOICON
options results
if Show("P","DOPUS.1") then
address "DOPUS.1"
Else Do
exit
end
dopus version
If ( result='RESULT' | translate(result,'.',' ') < 5.1218 ) then do
dopus request '"This script requires DOpus v5.5 or greater." OK'
exit
end
lister query source
slist=result
lister query slist path
picpath=result
lister query slist selfiles stem pics.
if pics.count=0 then do
lister request slist '"No selected files."' 'OK'
exit
end
totsel = pics.count-1
/* Get Visage to produce output for us to grab the version string */
address command 'visage >pipe:visout produceoutput'
Call Open('bozo', 'pipe:visout', 'R')
clown = ReadCh('bozo', 89)
visver = SUBSTR(clown,4,12)
visauth = SUBSTR(clown,32,18)
Call Close('bozo')
versauth = visver' 'visauth
dopus front
lister set slist busy on
lister set slist newprogress name info title bar abort
lister set slist newprogress title versauth
lister set slist newprogress info 'Viewing files...'
number = 0
if pics.count ~=0 then do
do until number = pics.count
pic=pics.number
lister set slist newprogress bar totsel number
lister set slist newprogress info 'Rendering 'pic'...'
address command Visage' >pipe:visout 'visopts picpath''pic''
Call Open('bozo', 'pipe:visout', 'R')
clown = ReadCh('bozo', 89)
dims = SUBSTR(clown,61,12)
lister set slist newprogress name 'File: 'pic' Dims: 'dims
Call Close('bozo')
lister select slist pic 0
lister refresh slist
lister query slist abort
if result then call EXIT
number = number + 1
end
EXIT:
lister refresh slist
lister set slist busy off
exit
end